class Shard
	#add attribute readers for meta and value hashes
	attr_reader :meta,:values

	#updates meta hash
	private def update
		@meta.size=@values.length
		@meta.is_empty=@meta.size<0
		@meta.editStamp=Time.new
		@meta.all[:size]             = @meta.size
		@meta.all[:is_empty]         = @meta.is_empty
		@meta.all[:num_indentifiers] = @meta.num_indentifiers
		@meta.all[:identifiers]      = @meta.identifiers
		@meta.all[:creationStamp]    = @meta.creationStamp
		@meta.all[:editStamp]        = @meta.editStamp
	end

	#return element(s) from shard (optional range)
	def list(element,index=0,endnum=-1)
		if @@elements.include?(element)
			@@temp=[]
			@values[index..endnum].each{|v| @@temp<<v[element]}
			return @@temp
		else
			raise "Improper or no type supplied."
		end
	end

	#prune by all elements
	def pAll
		prune(*@@elements)
	end

	#list element by single index
	def lPos(element,index)
		list(element,index,index)
	end

	#aliases
	alias :listPos :lPos
	alias :pruneAll :pAll
end